<template>
  <div class="top-fixed">
    <header class="headerbar">
      <div @click="goback" class="left">
          <!-- <i class="icon"></i> -->
          <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-prev"></use>
            </svg>
          <span class="text">{{name}}</span>
      </div>
      <div class="center">
        <h1 class="title">{{title}}</h1>
      </div>
    </header>
  </div>
</template>

<script>
  export default {
    name: 'header',
    data () {
      return {
        title: 'e家便利店',
        name: '返回'
      }
    },
    methods: {
      goback() {
        this.$router.go(-1)
      }
    }
  }
  
</script>

<!-- Add "scoped" attribute to limit CSS to this component only  -->
<style lang="scss" scoped>
  @import '../assets/styles/headerbar';
</style>
